<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Set和Map</title>
</head>
<body>
    <script>
        "use strict";
        var set = new Set();
        set.add(["a","b","c","d","e","f","g","h","i","j","k"]);

        set.forEach(element => {
            console.log(element);
        });

        var array = [2,3,4,5,6,7,8,9];
        array.forEach(element => {
            console.log(element);
        });

        console.log("================================");
        
        array.forEach(function(item){
            if (item>3){
                console.log(item);
            }
        });

        array.some(function(item){
            if (item > 3){
                console.log(item);
            }
        });



        let map = new Map();
        map.set("张三",23);
        map.set("李四",24);
        map.set("王五",25);
        map.set("赵六",26);
        map.forEach(function(item,iter){
            console.log(item,iter);
        });
    </script>
</body>
</html>